import request from '../http.js'

// 停车记录
export const carcomeList = data => {
	return request({
			url: `/carcome/list`,
			method: 'POST',
			data
	})
}

// 室内订单记录
export const getIndoorUnpaidOrder = data => {
	return request({
			url: `/order/union/indoor/getUnpaidOrder/${data.id}`,
			method: 'GET',
			data
	})
}

// 路侧订单记录
export const getOutdoorUnpaidOrder = data => {
	return request({
			url: `/order/union/outdoor/getUnpaidOrder`,
			method: 'POST',
			data
	})
}

// 停车记录详情
export const carcomeDetail = data => {
	return request({
			url: `/carcome/${data.id}`,
			method: 'GET',
			data
	})
}

// 判断路侧是否存在欠费
export const outdoorCheckDebt = data => {
	return request({
			url: `/order/union/outdoor/checkDebt`,
			method: 'POST',
			data
	})
}

// 欠费订单支付
export const orderUnionPay = data => {
	return request({
			url: `/alipay/pay/orderUnionPay`,
			method: 'POST',
			data
	})
}

// 根据出入口获取欠费订单记录列表
export const listUnpaidOrder = portId => {
	return request({
			url: `/order/union/listUnpaidOrder/${portId}`,
			method: 'GET',
	})
}

// 点击缴费，车辆出场
export const similarOut = data => {
	return request({
			url: `/carcome/similar/out`,
			method: 'POST',
			data
	})
}

// 根据出入口获取车牌订单信息
export const similarInfo = portId => {
	return request({
			url: `/carcome/similar/${portId}`,
			method: 'GET',
	})
}

// 获取待支付订单
export const listunionUnpaidOrder = data => {
	return request({
			url: `/order/union/listUnpaidOrder`,
			method: 'POST',
			data
	})
}